import router from "../router";
import {useUserStore} from "../stores/userStore.ts";

router.beforeEach((to, _from, next) => {
    let userStore = useUserStore();
    if (to.path === '/' && userStore.isLogin) {
        window.location.href = "/problem"
    }
    next();
});
